package net.mimai.vultrue.bus.enums;

import net.mimai.vultrue.framework.utils.JudgeUtils;

/**
 * @ClassName AuditStatus
 * @Description 审批状态
 * @Author 方丈
 * @Date 2021/2/2 9:36
 * @Version 1.0.0
 **/
public enum SenDataType {
    CM(10,"客户手机号"),
    CT(11,"客户电话"),
    SM(20,"供应商手机号"),
    ST(12,"供应商电话")
    ;
    Integer key;
    String desc;

    SenDataType(int key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static Boolean isMember(int key){
        SenDataType[] vs= SenDataType.values();
        for(SenDataType h:vs){
            if(JudgeUtils.equals(key,h.getKey())){
                return true;
            }
        }
        return false;
    }

    public static SenDataType getByKey(int key){
        SenDataType[] vs= SenDataType.values();
        for(SenDataType h:vs){
            if(JudgeUtils.equals(key,h.getKey())){
                return h;
            }
        }
        return null;
    }
}
